.class public Lroboguice/test/RoboUnitTestCase;
.super Landroid/test/InstrumentationTestCase;
.source "RoboUnitTestCase.java"


# annotations
.annotation system Ldalvik/annotation/Signature;
    value = {
        "<AppType:",
        "Lroboguice/application/RoboApplication;",
        ">",
        "Landroid/test/InstrumentationTestCase;"
    }
.end annotation


# instance fields
.field protected a:Lcom/google/inject/Injector;


# direct methods
.method public constructor <init>()V
    .locals 0

    .prologue
    .line 41
    invoke-direct {p0}, Landroid/test/InstrumentationTestCase;-><init>()V

    return-void
.end method


# virtual methods
.method protected a()Ljava/lang/Class;
    .locals 2
    .annotation system Ldalvik/annotation/Signature;
        value = {
            "()",
            "Ljava/lang/Class",
            "<+",
            "Lroboguice/application/RoboApplication;",
            ">;"
        }
    .end annotation

    .prologue
    .line 66
    invoke-virtual {p0}, Ljava/lang/Object;->getClass()Ljava/lang/Class;

    move-result-object v0

    invoke-virtual {v0}, Ljava/lang/Class;->getGenericSuperclass()Ljava/lang/reflect/Type;

    move-result-object p0

    check-cast p0, Ljava/lang/reflect/ParameterizedType;

    .line 67
    invoke-interface {p0}, Ljava/lang/reflect/ParameterizedType;->getActualTypeArguments()[Ljava/lang/reflect/Type;

    move-result-object v0

    const/4 v1, 0x0

    aget-object p0, v0, v1

    check-cast p0, Ljava/lang/Class;

    return-object p0
.end method

.method protected runTest()V
    .locals 7

    .prologue
    const/4 v6, 0x1

    const/4 v5, 0x0

    .line 46
    invoke-virtual {p0}, Lroboguice/test/RoboUnitTestCase;->getInstrumentation()Landroid/app/Instrumentation;

    move-result-object v0

    .line 47
    invoke-virtual {v0}, Landroid/app/Instrumentation;->getTargetContext()Landroid/content/Context;

    move-result-object v1

    .line 48
    invoke-virtual {p0}, Lroboguice/test/RoboUnitTestCase;->a()Ljava/lang/Class;

    move-result-object v2

    new-array v3, v6, [Ljava/lang/Class;

    const-class v4, Landroid/app/Instrumentation;

    aput-object v4, v3, v5

    invoke-virtual {v2, v3}, Ljava/lang/Class;->getConstructor([Ljava/lang/Class;)Ljava/lang/reflect/Constructor;

    move-result-object v2

    .line 49
    new-array v3, v6, [Ljava/lang/Object;

    aput-object v0, v3, v5

    invoke-virtual {v2, v3}, Ljava/lang/reflect/Constructor;->newInstance([Ljava/lang/Object;)Ljava/lang/Object;

    move-result-object v0

    check-cast v0, Lroboguice/application/RoboApplication;

    .line 50
    invoke-virtual {v0}, Lroboguice/application/RoboApplication;->a()Lcom/google/inject/Injector;

    move-result-object v0

    iput-object v0, p0, Lroboguice/test/RoboUnitTestCase;->a:Lcom/google/inject/Injector;

    .line 51
    iget-object v0, p0, Lroboguice/test/RoboUnitTestCase;->a:Lcom/google/inject/Injector;

    const-class v2, Lroboguice/inject/ContextScope;

    invoke-interface {v0, v2}, Lcom/google/inject/Injector;->getInstance(Ljava/lang/Class;)Ljava/lang/Object;

    move-result-object v0

    check-cast v0, Lroboguice/inject/ContextScope;

    .line 54
    :try_start_0
    invoke-virtual {v0, v1}, Lroboguice/inject/ContextScope;->a(Landroid/content/Context;)V

    .line 55
    invoke-super {p0}, Landroid/test/InstrumentationTestCase;->runTest()V
    :try_end_0
    .catchall {:try_start_0 .. :try_end_0} :catchall_0

    .line 57
    invoke-virtual {v0, v1}, Lroboguice/inject/ContextScope;->b(Landroid/content/Context;)V

    .line 59
    return-void

    .line 57
    :catchall_0
    move-exception v2

    invoke-virtual {v0, v1}, Lroboguice/inject/ContextScope;->b(Landroid/content/Context;)V

    throw v2
.end method
